cmake_minimum_required(VERSION 3.5)

project(OpenGLQtExample)

set(CMAKE_CXX_STANDARD 11)


set(CMAKE_PREFIX_PATH "/Users/gxznmac/Qt5.9.1-bk/5.9.1/clang_64/lib/cmake")
#set(CMAKE_PREFIX_PATH "/home/cst/Qt5.10.1/5.10.1/gcc_64/lib/cmake")
#set(CMAKE_PREFIX_PATH "/Users/gxznmac/Qt/6.6.1/macos/lib/cmake")
find_package(Qt5 REQUIRED COMPONENTS Gui OpenGL Widgets)
find_package(OpenGL REQUIRED)

qt5_add_resources(QT_RESOURCES resources.qrc)

add_executable(OpenGLQtExample
    main.cpp
    openglwidget.cpp
    openglwidget.h
    SkyboxWidget.h
    SkyboxWidget.cpp
    ${QT_RESOURCES}
)

target_link_libraries(OpenGLQtExample Qt5::Widgets Qt5::Gui Qt5::OpenGL ${OPENGL_LIBRARIES})
#target_link_libraries(OpenGLQtExample Qt6::Widgets Qt6::Gui Qt6::OpenGL Qt6::OpenGLWidgets ${OPENGL_LIBRARIES})
